package com.yjy.demo04;

public class Circle {
    double r;
    public  void area(){
        double pai=3.14;
        double s=pai *r*r;
        System.out.println("面积为"+s);
    }
    public void area2(double pai){
        double s=pai*r*r;
        System.out.println("面积为"+s);
    }
    //传递一个半径和pai给我返回面积
    public double area3(double r,double pai){
        double s = pai*r*r;
        return s;
    }
}

